package com.gerald.shop.fegin.api;


import com.gerald.shop.common.utils.PageUtils;
import com.gerald.shop.common.utils.R;
import com.gerald.shop.entity.GoodsEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 *@author Gerald 2022/1/3 22:03
 *description:
 */
@FeignClient(value = "shop-goods",path = "/goods")
public interface GoodsService {


    @GetMapping("/list")
    public List<GoodsEntity> list();

    @GetMapping("/page")
    public PageUtils page(@RequestParam Map<String, Object> params);
    /**
     * 保存
     */
    @RequestMapping("/save")
    public boolean save(@RequestBody GoodsEntity goods);




    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public GoodsEntity info(@PathVariable("id") Long id);

    /**
     * 修改
     */
    @RequestMapping("/update")
    public boolean update(@RequestBody GoodsEntity goods);

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public boolean delete(@RequestBody Long[] ids);
}
